package paperockscissors;

import java.util.ArrayList;
import java.util.List;

public class Player
{
	
	private String			name;
	private int				score;
	private List<RPSEnum>	summary;
	
	public Player(String name, int score, List<RPSEnum> moves)
	{
		this.name = name;
		this.score = score;
		this.summary = moves;
	}
	
	public Player(String name)
	{
		this.name = name;
		this.score = 0;
		this.summary = new ArrayList<RPSEnum>();
		
		for (int i = 0; i < 10; i++)
		{
			int random = (int) (Math.random() * (2));
			
			switch (random)
			{
				case 0:
					this.summary.add(RPSEnum.ROCK);
					break;
				case 1:
					this.summary.add(RPSEnum.PAPER);
					break;
				case 2:
					this.summary.add(RPSEnum.SCISSORS);
					break;
				default:
					break;
			
			}	
		}	
	}
	
	public String getName()
	{
		return this.name;
	}
	
	public int getScore()
	{
		return this.score;
	}
	
	public int getRPSEnumLength()
	{
		return this.summary.size();
	}
	
	public RPSEnum getNextMove()
	{
		return summary.listIterator().next();
	}
	
	public void setScore(int score)
	{
		this.score = score;
	}
	
}
